home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD022b.dsk
/
FULL FATHOM FIVE.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
10KB
|
199 lines
10 I = J = SS = T = S = M = SK = TM
20 PRINT CHR$(4);"OPEN FATHOM SCORE,L10"
30 PRINT CHR$(4);"READ FATHOM SCORE,R1"
40 INPUT HS
50 PRINT CHR$(4);"CLOSE FATHOM SCORE"
500 DIM XDC(5),YDC(5)
510 DIM XT(5),YT(5),XS(5),YS(5)
800 D = 0:S = 0:T = 0:OO = 0
810 YS(1) = 80:YS(2) = 60:YS(3) = 140:YS(4) = 100:YS(5) = 120
820 FOR I = 1 TO 10
830 R1 = INT(5 * RND(1)) +1:R2 = INT(5 * RND(1)) +1
840 TEMP = YS(R1):YS(R1) = YS(R2):YS(R2) = TEMP
850 NEXT I
900 GOSUB 5000
1000 REM MOVE SHIP
1020 P = PDL(0): IF P <120 THEN 1100
1040 IF P >134 THEN 1200
1060 GOTO 1500
1100 REM MOVE SHIP LEFT
1110 IF SS <12 THEN 1140
1115 NS = INT((120 -P)/10)
1120 HCOLOR= 0: DRAW 1 AT SS,20:SS = SS -NS: HCOLOR= 3: DRAW 1 AT SS,20
1140 GOTO 1500
1200 REM MOVE SHIP RIGHT
1210 IF SS >240 THEN 1500
1215 NS = INT((P -134)/10)
1220 HCOLOR= 0: DRAW 1 AT SS,20:SS = SS +NS: HCOLOR= 3: DRAW 1 AT SS,20
1500 REM SHIP FIRE?
1510 IF D >5 THEN 2000
1520 P = PEEK( -16287): IF P < = 127 THEN 2000
1530 POKE -16368,0
1540 HCOLOR= 3: DRAW 5 AT SS +15,30
1560 D = D +1
1570 FOR I = 1 TO 5
1572 IF XDC(I) = 0 THEN M = I:I = 5
1575 NEXT I
1580 XDC(M) = SS +15:YDC(M) = 30
2000 REM MOVE SUBS
2010 IF S = 0 THEN 2500
2020 FOR I = 1 TO 5
2025 IF XS(I) = 0 THEN 2200
2030 HCOLOR= 0:SH = 2.5 -.5 *DS(I): DRAW SH AT XS(I),YS(I)
2031 IF RND(1) <.06 OR RND(1) >.94 THEN DS(I) = -1 *DS(I)
2040 XS(I) = XS(I) +DS(I) *5
2060 IF XS(I) <10 THEN DS(I) = -1 *DS(I):XS(I) = 10
2080 IF XS(I) >255 THEN DS(I) = -1 *DS(I):XS(I) = 255
2100 HCOLOR= 6:SH = 2.5 -.5 *DS(I): DRAW SH AT XS(I),YS(I)
2200 NEXT I
2500 REM MOVE WEAPONRY
2520 IF D = 0 THEN 2820
2540 FOR I = 1 TO 5
2545 IF XDC(I) = 0 THEN 2800
2550 HCOLOR= 0: DRAW 5 AT XDC(I),YDC(I)
2560 YDC(I) = YDC(I) +10
2580 HCOLOR= 3: DRAW 5 AT XDC(I),YDC(I)
2600 IF YDC(I) <141 THEN 2800
2620 HCOLOR= 0: DRAW 5 AT XDC(I),YDC(I):XDC(I) = 0:D = D -1
2800 NEXT I
2820 IF T = 0 THEN 3000
2840 FOR I = 1 TO 5
2850 IF XT(I) = 0 THEN 2990
2860 HCOLOR= 0: DRAW 6 AT XT(I),YT(I):YT(I) = YT(I) -10: HCOLOR= 3: DRAW 6 AT XT(I),YT(I)
2990 NEXT I
3000 REM SHIP HIT?
3020 FOR I = 1 TO 5
3030 IF XT(I) = 0 THEN 3190
3040 IF YT(I) >30 THEN 3190
3050 IF ABS(SS -XT(I) +13) >14 THEN 3100
3055 HT = XT(I)
3060 HCOLOR= 5: DRAW 4 AT HT,21::Q = 200:E = 100: GOSUB 10000: DRAW 4 AT HT,16: GOSUB 10000: DRAW 4 AT HT -5,12: GOSUB 10000: DRAW 4 AT HT +2,9
3080 OO = 1:I = 5: GOTO 3190
3100 HCOLOR= 0: DRAW 6 AT XT(I),YT(I):T = T -1
3120 HCOLOR= 6: DRAW 4 AT XT(I),19: FOR BB = 1 TO 100: NEXT BB
3140 HCOLOR= 0: DRAW 4 AT XT(I),19:XT(I) = 0
3190 NEXT I
3195 IF OO = 1 THEN HTAB 11: FLASH : PRINT "SHIP DESTROYED!": NORMAL : GOTO 6000
3200 REM SUB HIT?
3205 IF D = 0 OR S = 0 THEN 3500
3210 FOR I = 1 TO 5
3220 IF XS(I) = 0 THEN 3490
3230 FOR J = 1 TO 5
3240 IF XDC(J) = 0 THEN 3480
3260 IF YS(I) < >YDC(J) THEN 3480
3280 IF ABS(XDC(J) -XS(I) -9) >10 THEN 3480
3300 HCOLOR= 5:SH = 2.5 -.5 *DS(I): DRAW SH AT XS(I),YS(I)
3310 SC = SC +1: VTAB 23: HTAB 25: PRINT "SUB HITS: ": HTAB 35: VTAB 23: INVERSE : PRINT SC: NORMAL
3320 Q = 250:E = 50: GOSUB 10000
3340 HCOLOR= 0: DRAW 5 AT XDC(J),YDC(J):XDC(J) = 0:D = D -1
3360 DRAW SH AT XS(I),YS(I):XS(I) = 0:S = S -1
3480 NEXT J
3490 NEXT I
3500 REM SUB FIRE?
3520 IF S = 0 THEN 4000
3540 FOR I = 1 TO 5
3560 IF XS(I) = 0 THEN 3900
3580 IF XT(I) >0 THEN 3900
3600 IF ABS(SS -XS(I)) >15 +YS(I)/5 THEN 3900
3610 IF RND(1) >.8 THEN 3900
3620 XT(I) = XS(I) +10:YT(I) = YS(I) -10
3640 HCOLOR= 3: DRAW 6 AT XT(I),YT(I)
3660 T = T +1
3900 NEXT I
4000 REM SUB APPEAR?
4020 IF S >4 THEN 4500
4040 R = RND(1): IF R >.3 AND R <SK THEN 4057
4050 IF S = 0 THEN 4057
4055 GOTO 4500
4057 FOR I = 1 TO 5: IF XS(I) = 0 THEN M = I:I = 5
4058 NEXT I
4060 S = S +1:DS(M) = -1 ^( RND(1) <.5)
4080 IF DS(M) = -1 THEN XS(M) = 250
4100 IF DS(M) = 1 THEN XS(M) = 15
4120 HCOLOR= 6:SH = 2.5 -.5 *DS(M): DRAW SH AT XS(M),YS(M)
4200 GOTO 4500
4500 REM SONAR BLIP
4520 Q = 150:E = 10: GOSUB 10000
4530 Q = 120:E = 10: GOSUB 10000
4540 TM = TM +1: VTAB 23: HTAB 3: PRINT "TIME :": VTAB 23: HTAB 9: INVERSE : PRINT TM: NORMAL
4560 IF TM = VAL(TA$) THEN 6000
4580 GOTO 1000
5000 D$ = "<CTRL-D>": REM CTRL D
5010 IF PEEK(770) = 77 THEN 5025
5015 POKE 770,77
5020 PRINT D$;"BLOAD FATHOM-X,A16384"
5025 GOSUB 32000
5030 POKE 232,0: POKE 233,64
5032 TEXT
5033 GOSUB 13000: VTAB 21: INPUT "SELECT A SKILL LEVEL (1=EASY...8=LETHAL) ";SK
5034 VTAB 23: INPUT "LENGTH OF GAME (100-500 'SECONDS') ";TA$
5035 LE = SK
5036 IF SK <1 OR SK >8 THEN 5033
5038 SK = .31 +.01 *(1.7 ^(SK -1))
5040 HOME : HGR
5050 ROT= 0: SCALE= 1
5060 HCOLOR= 6: HPLOT 0,29 TO 279,29
5070 HCOLOR= 3
5080 DRAW 1 AT 130,20
5090 SS = 130
5095 SC = 0:TM = 0
5100 VTAB 21: HTAB 3: PRINT "HIT PDL (0) TO FIRE DEPTH CHARGE"
5105 VTAB 23: HTAB 14: PRINT "LEVEL ";LE
5110 VTAB 23: HTAB 25: PRINT "SUB HITS: ": HTAB 35: VTAB 23: INVERSE : PRINT SC: NORMAL
5120 RETURN
6000 HTAB 15: PRINT "GAME OVER!": GET ROBERT$: PRINT ROBERT$: PRINT : PRINT "WANT TO PLAY AGAIN? Y/N ": GET ROBERT$: PRINT ROBERT$
6010 IF HS >SC THEN 6030
6020 IF HS <SC THEN HS = SC
6030 PRINT CHR$(4);"OPEN FATHOM SCORE,L10"
6040 PRINT CHR$(4);"WRITE FATHOM SCORE, R1"
6045 PRINT HS
6050 PRINT CHR$(4);"CLOSE FATHOM SCORE"
6060 IF ROBERT$ = "Y" THEN RUN 10
6070 PRINT : PRINT CHR$(4)"RUNMENU"
10000 POKE 776,Q: POKE 777,E: CALL 778: RETURN
13000 HOME : VTAB 1: PRINT "FATHOM -- THE SUBMARINE WARFARE GAME"
13005 PRINT "---------------------------------------"
13007 HTAB 5: PRINT "ORIGINALLY BY JIM HILGER"
13008 HTAB 5: PRINT "MADE BETTER BY ROBERT MOSKOWITZ"
13010 VTAB 7: PRINT "USE GAME PADDLE (0) FOR <= => & SPEED": PRINT " CONTROL OF YOUR SUB DESTROYER"
13020 PRINT : PRINT "HIT PDL (0) BUTTON TO LAUNCH A ": PRINT " DEPTH CHARGE "
13030 PRINT : PRINT "WATCH OUT FOR THOSE TRICKY SUBS": PRINT " AND THEIR TORPEDOES!"
13040 PRINT : PRINT "PREVIOUS HIGH SCORE HAS BEEN ";HS
32000 POKE 776,255: POKE 777,255: POKE 778,173: POKE 779,48: POKE 780,192: POKE 781,136: POKE 782,208: POKE 783,5: POKE 784,206: POKE 785,9: POKE 786,3: POKE 787,240
32010 POKE 788,9: POKE 789,202: POKE 790,208: POKE 791,245: POKE 792,174: POKE 793,8: POKE 794,3: POKE 795,76: POKE 796,10: POKE 797,3: POKE 798,96: RETURN
267 p<CTRL-A> HIMEM: <CTRL-A> LOAD <CTRL-A><CTRL-I><CTRL-I><CTRL-I><CTRL-I>)<CTRL-I><CTRL-I><CTRL-I><CTRL-I>)<CTRL-I><CTRL-I><CTRL-I><CTRL-I><CTRL-Q><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-_>;<CTRL-_>?<CTRL-[><CTRL-_><CTRL-[><CTRL-[><CTRL-[><CTRL-S><CTRL-I><CTRL-I><CTRL-I><CTRL-I>)<CTRL-I>-)<CTRL-M>)<CTRL-I><CTRL-I><CTRL-I><CTRL-I><CTRL-Q>;<CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-_>???<CTRL-_><CTRL-_><CTRL-[><CTRL-[><CTRL-[><CTRL-S>)-<CTRL-M>)-------<CTRL-I><CTRL-I>)<CTRL-Q><CTRL-[>;<CTRL-[><CTRL-[>;??????<CTRL-[><CTRL-[><CTRL-_><CTRL-S>--------------5<CTRL-[>?????????????<CTRL-W><CTRL-I>------------<CTRL-I><CTRL-Q><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-S>
2313 <CTRL-I>-<CTRL-I><CTRL-I><CTRL-I><CTRL-Q><CTRL-[><CTRL-[><CTRL-[><CTRL-[>;<CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-S><CTRL-I><CTRL-I><CTRL-I><CTRL-I><CTRL-I><CTRL-M><CTRL-I><CTRL-I><CTRL-I><CTRL-Q><CTRL-[><CTRL-[><CTRL-[>;??<CTRL-[><CTRL-[><CTRL-[><CTRL-S><CTRL-I><CTRL-I><CTRL-I><CTRL-I>--<CTRL-M><CTRL-I><CTRL-I><CTRL-Q><CTRL-[><CTRL-[><CTRL-[>???<CTRL-_><CTRL-[><CTRL-[><CTRL-S>---------5;???????<CTRL-[>7<CTRL-I><CTRL-I>)-----<CTRL-M><CTRL-Q><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-S>
10505 <CTRL-M><CTRL-I><CTRL-I><CTRL-I><CTRL-I><CTRL-Q><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[>;<CTRL-[><CTRL-[><CTRL-[><CTRL-S><CTRL-I><CTRL-I><CTRL-I><CTRL-I><CTRL-M><CTRL-I><CTRL-I><CTRL-I><CTRL-I><CTRL-Q><CTRL-[><CTRL-[><CTRL-[><CTRL-[>;??<CTRL-[><CTRL-[><CTRL-S><CTRL-I><CTRL-I><CTRL-I>--<CTRL-M><CTRL-I><CTRL-I><CTRL-I><CTRL-Q><CTRL-[><CTRL-[><CTRL-[><CTRL-[>???<CTRL-_><CTRL-[><CTRL-S>---------5?<CTRL-[>???????<CTRL-W><CTRL-I>)-----<CTRL-M><CTRL-I><CTRL-Q><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-[><CTRL-S>
2313 <CTRL-Q><CTRL-[><CTRL-_><CTRL-[><CTRL-[><CTRL-S><CTRL-I><CTRL-M><CTRL-I><CTRL-I><CTRL-Q><CTRL-[>;<CTRL-[>;<CTRL-S><CTRL-M>)<CTRL-I><CTRL-M>1;<CTRL-[><CTRL-_><CTRL-_><CTRL-W><CTRL-I><CTRL-M>-)<CTRL-Q><CTRL-[>?<CTRL-[>?<CTRL-S><CTRL-I>)-<CTRL-M><CTRL-Q><CTRL-[><CTRL-[>?<CTRL-[><CTRL-S>
15130 <CTRL-S><CTRL-I><CTRL-M><CTRL-Z>?<CTRL-W>-->?7--<CTRL-F>
16154 <CTRL-W>-->?7<CTRL-I><CTRL-M><CTRL-Z>?<CTRL-W>-)<CTRL-F>
34 SCRN( <CTRL-Q> POP <CTRL-S> GOSUB 32000
5030 POKE 232,0: POKE 233,64
5032 TEXT
5033 GOSUB 13000: VTAB 21: PRINT "SELECT A SKILL LEVEL (1=EASY...8=LETHAL)"
5034 VTAB 23: INPUT "LEVEL ";SK
5035 LE = SK
5036 IF SK <1 OR SK >8 THEN 5033
5038 SK = .31 +.01 *(1.7 ^(SK -1))
5040 HOME : HGR
5050 ROT= 0: SCALE= 1
5060 HCOLOR= 6: HPLOT 0,29 TO 279,29
5070 HCOLOR= 3
5080 DRAW 1 AT 130,20
5090 SS = 130
5095 SC = 0:TM = 0
5100 VTAB 21: HTAB 3: PRINT "HIT ANY KEY TO FIRE DEPTH CHARGE"
5105 VTAB 23: HTAB 14: PRINT "LEVEL ";LE
5110 VTAB 23: HTAB 25: PRINT "SUB HITS: ";SC
5120 RETURN
6000 HTAB 15: PRINT "GAME OVER!": END
10000 POKE 776,Q: POKE 777,E: CALL 778: RETURN
13000 HOME : VTAB 2: PRINT "FATHOM -- THE SUBMARINE WARFARE GAME"
13005 PRINT "---------------------------------------"
13007 HTAB 5: PRINT "BY JIM HILGER"
13010 VTAB 10: PRINT "USE GAME PADDLE DIAL TO STEER ": PRINT "YOUR BATTLESHIP."
13020 PRINT : PRINT "HIT ANY KEY TO LAUNCH A DEPTH": PRINT "CHARGE."
13030 PRINT : PRINT "WATCH OUT FOR THOSE TORPEDOES!"
13040 RETURN
32000 POKE 776,255: POKE 777,255: POKE 778,173: POKE 779,48: POKE 780,192: POKE 781,136: POKE 782,208: POKE 783,5: POKE 784,206: POKE 785,9: POKE 786,3: POKE 787,240
32010 POKE 788,9: POKE 789,202: POKE 790,208: POKE 791,245: POKE 792,174: POKE 793,8: POKE 794,3: POKE 795,76: POKE 796,10: POKE 797,3: POKE 798,96: RETURN